package com.nami.store.biz.friend.service;

import com.nami.store.api.response.friend.FriendDTO;
import com.nami.store.biz.friend.convert.FriendConvert;
import com.nami.store.biz.friend.repository.FriendRepository;
import com.nami.store.domain.FriendDO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
@RequiredArgsConstructor
public class FriendDomainServiceImpl implements FriendDomainService {

    private final FriendRepository friendRepository;

    @Override
    public FriendDTO getFriendInfo(String from, String to) {
        FriendDO friendInfo = friendRepository.getFriendInfo(from, to);
        return FriendConvert.INSTANCE.convert(friendInfo);
    }

}
